﻿@using Gpsys.Web.Common
@model Gpsys.Web.Models.QueueModel
           
@{
    ViewBag.Title = " Queue Detail";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section jsFooter{
    <script type="text/javascript" src="@Url.Content("~/Content/js/gps/queuedetail.js")"></script>
}
<div class="mws-panel grid_8">
    <div class="mws-tabs">
        <ul>
            <li><a href="#tab-1">Queue</a></li>
            <li><a href="#tab-2">Xml</a></li>
            <li><a href="#tab-3">Logs</a></li>
        </ul>
        <div id="tab-1">
            <form class="mws-form" action="form_layouts.html">
            <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Id</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.Id
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Type</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.Type
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Flow</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.Flow
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        TRN</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.TRN
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Currency</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.Currency
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Amount</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.Amount
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Related Queue Id</label>
                    <div class="mws-form-item medium">
                        @if(@Model.Queue.RelatedQueueId.HasValue)
                        {
                            <a href="@Url.Action("Detail", "Queue", new { @Id = Model.Queue.RelatedQueueId })" style="color:Blue"> @Model.Queue.RelatedQueueId </a>
                        }
                        else
                        {
                            @Model.Queue.RelatedQueueId
                        }
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Last Log</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.LastLog
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Created By</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.CreatedBy
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Created On</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.CreatedOn
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Modified By</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.ModifiedBy
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">
                        Modified On</label>
                    <div class="mws-form-item medium">
                        @Model.Queue.ModifiedOn
                    </div>
                </div>
                
            </div>
            </form>
        </div>
        <div id="tab-2">
            <pre class="prettyprint linenums theme-balupton lang-xml">
@Model.QueueXml.Xml.FormatXml()
                        </pre>
        </div>
        <div id="tab-3">
            <table class="mws-table mws-datatable">
                <thead>
                    <tr>
                        <th>
                            Id
                        </th>
                        <th>
                            Content
                        </th>
                        <th>
                            Created By
                        </th>
                        <th>
                            Created On
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var ql in Model.LogList)
                    {
                        <tr>
                            <td>
                                @ql.Id
                            </td>
                            <td>
                                @ql.LogContent
                            </td>
                            <td>
                                @ql.CreatedBy
                            </td>
                            <td>
                                @ql.CreatedOn.ToString("yyyy-MM-dd HH:mm:ss fff")
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
